package com.ruoyi.employment.api.factory;

import com.ruoyi.employment.api.RemoteEmploymentService;
import com.ruoyi.employment.api.domain.TeacherToEmploymentDto;
import com.ruoyi.common.core.domain.R;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
import java.util.List;

@Component
public class RemoteEmploymentFallbackFactory implements FallbackFactory<RemoteEmploymentService> {
    @Override
    public RemoteEmploymentService create(Throwable cause) {
        return new RemoteEmploymentService() {
            @Override
            public R<Void> teacherToEmployment(List<TeacherToEmploymentDto> list) {
                return  R.fail("远程调用就业服务teacherToEmployment方法失败");
            }

            @Override
            public List<TeacherToEmploymentDto> getAllTrack() {
                return null;
            }
        };
    }
}
